package com.zhijiaoyun.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public class Order implements Serializable {

	private static final long serialVersionUID = -7544285622876913559L;

	private Long orderId;

    private String orderNum;

    private Long userId;
    
    private String subject;
    
    private String body;

    private BigDecimal price;

    private Integer status;

    private Date createTime;

    private Date modifyTime;

    public class Status {
    	public static final int WAIT_PAYING = 1;
    	public static final int SUCCESS = 2;
    	public static final int CANCEL = 3;
	}

    public Order() {
		super();
	}

	public Order(String orderNum, Long userId, String subject, String body, 
			BigDecimal price, Integer status) {
		super();
		this.orderNum = orderNum;
		this.userId = userId;
		this.subject = subject;
		this.body = body;
		this.price = price;
		this.status = status == null ? 1 : status;
		this.createTime = new Date();
		this.modifyTime = this.createTime;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public String getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(String orderNum) {
		this.orderNum = orderNum;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

}